<?php

class OutboundHelper {
	
	public static function getDetail($id){
		return $bound=BoundHelper::getDetail($id) && $bound['class']=='out' ? $bound : false;
	}
	
	public static function getList($where=null, $order='', $s=0, $l=0){
		if(!$order) $order = 'id DESC';
		return Db::get('_Bound')->select()->where($where)->order($order)->limit($s,$l)->hkey('id')->getAll();
	}

	public static function count($where=null){
		return Db::get('_Bound')->count()->where($where)->getCol();
	}
	
}

?>
